<!--
 * @FilePath     : /study_code/layui/11-23.html
 * @Description  : 分组中，开启本地搜索
 * @Date         : 2025-04-09 11:36:46
 * @Author       : Fang YingGui
 * @LastEditors  : fangyinggui 18715384437@163.com
 * @LastEditTime : 2025-04-09 15:25:23
-->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>documentName</title>
    <link rel="stylesheet" href="/layui/dist/css/layui.css" />
    <link rel="stylesheet" href="/layui/extends_modules/formSelects-v4/formSelects-v4.css" />
  </head>
  <body>
    <select name="city" xm-select="select7_2" xm-select-search="">
      <optgroup label="分组1">
        <option value="1" disabled="disabled">北京</option>
        <option value="2" selected="selected">上海</option>
      </optgroup>
      <optgroup label="分组2">
        <option value="3">广州</option>
        <option value="4" selected="selected">深圳</option>
        <option value="5">天津</option>
      </optgroup>
    </select>

    <script src="/layui/dist/layui.js"></script>
    <script>
      layui
        .config({
          base: '/layui/extends_modules/', // 配置 layui 第3方扩展模块存放的基础目录
        })
        .extend({
          formSelects: '/formSelects-v4/formSelects-v4',
        })
        .use(['jquery', 'formSelects'], function () {
          var $ = layui.jquery,
            formSelects = layui.formSelects

          console.log(1, '访问模块', formSelects)
        })
    </script>
  </body>
</html>
